import { register } from "../../utils/Layer";
import { BaseTileLayer } from './BaseTileLayer'

export class TmsLayer extends BaseTileLayer {
  //构建ImageryProvider
  _createImageryProvider(options) {
    return createImageryProvider(options)
  }
}

function createImageryProvider(options) {

  return new Cesium.TileMapServiceImageryProvider(options)
}

TmsLayer.createImageryProvider = createImageryProvider

//注册下
const layerType = 'tms' //图层类型
register(layerType, TmsLayer)
